package com.ellecity06.cwhiskymall.adapter

import android.view.LayoutInflater
import android.view.ViewGroup
import com.ellecity06.common.base.BaseAdapter
import com.ellecity06.cwhiskymall.bean.MenuItem
import com.ellecity06.cwhiskymall.bean.TagItem
import com.ellecity06.cwhiskymall.databinding.ItemServiceMenuBinding

/**
 * @author ellecity06
 * @time 2024/10/25 11:36
 * @des
 */
class ServiceMenuAdapter : BaseAdapter<MenuItem, ItemServiceMenuBinding>() {

    override fun inflateBinding(layoutInflater: LayoutInflater, parent: ViewGroup, viewType: Int): ItemServiceMenuBinding {
        return ItemServiceMenuBinding.inflate(layoutInflater)
    }

    override fun convert(binding: ItemServiceMenuBinding, position: Int, item: MenuItem) {
        item?.let {
            binding.name.text = item.name
            binding.icon.setImageResource(item.icon)
        }

    }
}